<?php

use yii\db\Migration;

class m161022_080701_create_parents extends Migration
{
    public function up()
    {
        $this->createTable('kd_parents',[
            'jz_id'=>$this->primaryKey()->comment('家长序号'),
            'jz_name'=>$this->string(20)->notNull()->comment('家长姓名'),
            'jz_wxm'=>$this->string(30)->comment('家长微信名'),
            'jz_wxtx'=>$this->string(50)->comment('家长微信头像'),
            'xs_id'=>$this->integer(11)->notNull()->comment('对应的学生序号'),
            'xs_gx'=>$this->string(10)->notNull()->comment('和学生的关系'),
            'yey_id'=>$this->integer(11)->notNull()->comment('所属幼儿园序号'),
            'bj_id'=>$this->integer(11)->notNull()->comment('所属班级序号'),
            'xiugai_shijian'=>$this->dateTime(50)->comment('学生最后修改时间'),
            'xiugai_ren'=>$this->string(50)->comment('修改人')
            ]);

    }
    public function down()
    {
       $this->dropTable('kd_parents');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
